package com.minimalist.common.feign.client.lindi;

import com.minimalist.common.entity.lindi.vo.subsidyapplicationtownpayment.LindiSubsidyApplicationTownPaymentVO;
import com.minimalist.common.feign.config.FeignConfig;
import com.minimalist.common.feign.fallback.lindi.LindiSubsidyApplicationTownPaymentFeignClientFallbackFactory;
import com.minimalist.common.response.R;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import jakarta.validation.constraints.NotNull;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 林地指标平台_镇街支付明细Feign客户端
 *
 * @author 11987
 */
@FeignClient(name = "minimalist-lindi"
        , contextId = "lindiSubsidyApplicationTownPaymentFeignClient"
        , path = "/minimalist/lindi/subsidyApplicationTownPayment"
        , configuration = FeignConfig.class
        , fallbackFactory = LindiSubsidyApplicationTownPaymentFeignClientFallbackFactory.class)
public interface LindiSubsidyApplicationTownPaymentFeignClient {

    /**
     * 添加镇街支付明细
     * 
     * @param subsidyApplicationTownPaymentVO 镇街支付明细信息对象，包含支付明细的详细信息
     * @return 操作结果，成功返回成功信息，失败返回错误信息
     * @author 11987
     * @since 1.0.0
     */
    @PostMapping("/addSubsidyApplicationTownPayment")
    @Operation(summary = "添加镇街支付明细")
    R<?> addSubsidyApplicationTownPayment(
            @RequestBody @Validated(Add.class)
            LindiSubsidyApplicationTownPaymentVO subsidyApplicationTownPaymentVO);

    /**
     * 根据镇街支付明细ID删除镇街支付明细
     * 
     * @param subsidyApplicationTownPaymentId 镇街支付明细ID，不能为空
     * @return 操作结果，成功返回成功信息，失败返回错误信息
     * @author 11987
     * @since 1.0.0
     */
    @DeleteMapping("/deleteSubsidyApplicationTownPaymentBySubsidyApplicationTownPaymentId")
    @Operation(summary = "删除镇街支付明细 -> 根据镇街支付明细ID删除")
    R<?> deleteSubsidyApplicationTownPaymentBySubsidyApplicationTownPaymentId(
            @RequestParam("subsidyApplicationTownPaymentId")
            @NotNull(message = "镇街支付明细ID不能为空")
            @Parameter(name = "subsidyApplicationTownPaymentId", required = true, description = "镇街支付明细ID")
            Long subsidyApplicationTownPaymentId);

    /**
     * 根据镇街支付明细ID修改镇街支付明细信息
     * 
     * @param subsidyApplicationTownPaymentVO 镇街支付明细信息对象，包含需要更新的支付明细信息
     * @return 操作结果，成功返回成功信息，失败返回错误信息
     * @author 11987
     * @since 1.0.0
     */
    @PutMapping("/updateSubsidyApplicationTownPaymentBySubsidyApplicationTownPaymentId")
    @Operation(summary = "修改镇街支付明细")
    R<?> updateSubsidyApplicationTownPaymentBySubsidyApplicationTownPaymentId(
            @RequestBody @Validated(Update.class)
            LindiSubsidyApplicationTownPaymentVO subsidyApplicationTownPaymentVO);

    /**
     * 根据镇街支付明细ID查询镇街支付明细详细信息
     * 
     * @param subsidyApplicationTownPaymentId 镇街支付明细ID，不能为空
     * @return 镇街支付明细详细信息，如果不存在则返回空
     * @author 11987
     * @since 1.0.0
     */
    @GetMapping("/getSubsidyApplicationTownPaymentBySubsidyApplicationTownPaymentId/{subsidyApplicationTownPaymentId}")
    @Operation(summary = "根据镇街支付明细ID查询镇街支付明细")
    R<LindiSubsidyApplicationTownPaymentVO> getSubsidyApplicationTownPaymentBySubsidyApplicationTownPaymentId(
            @PathVariable(value = "subsidyApplicationTownPaymentId")
            @NotNull(message = "镇街支付明细ID不能为空")
            @Parameter(name = "subsidyApplicationTownPaymentId", description = "镇街支付明细ID", required = true)
            Long subsidyApplicationTownPaymentId);

    /**
     * 根据支付通知ID查询镇街支付明细列表
     * 
     * @param subsidyApplicationPayNoticeId 支付通知ID，不能为空
     * @return 镇街支付明细列表，如果不存在则返回空列表
     * @author 11987
     * @since 1.0.0
     */
    @GetMapping("/getSubsidyApplicationTownPaymentListBySubsidyApplicationPayNoticeId/{subsidyApplicationPayNoticeId}")
    @Operation(summary = "根据支付通知ID查询镇街支付明细列表")
    R<List<LindiSubsidyApplicationTownPaymentVO>> getSubsidyApplicationTownPaymentListBySubsidyApplicationPayNoticeId(
            @PathVariable(value = "subsidyApplicationPayNoticeId")
            @NotNull(message = "支付通知ID不能为空")
            @Parameter(name = "subsidyApplicationPayNoticeId", description = "支付通知ID", required = true)
            Long subsidyApplicationPayNoticeId);
}